#pragma once

#include "Containers/String.h"
#include "Containers/SharedObjectPtr.h"
class RObject;


//serialize object ptr to string
class IObjectSerializer
{
public:

    virtual ~IObjectSerializer() = default;
    virtual CString SerializeToString(RObject* InObject) = 0;
};

//deserialize object ptr from string
class IObjectDeserializer
{
public:
    virtual ~IObjectDeserializer() = default;
    virtual TSharedObjectPtr<RObject> DeserializeFromString(const CString& InString) = 0;
};

//save object as path string
class WHENGINE_API CObjectPtrPathSerializer : public IObjectSerializer , public IObjectDeserializer
{
public:
    CString SerializeToString(RObject* InObject) override;
    TSharedObjectPtr<RObject> DeserializeFromString(const CString& InString) override;
};
